<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8"/>
  <title>登录</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
  <th:block th:include="common/pub_head :: default"></th:block>
  <th:block th:include="common/pub_head :: layui"></th:block>
  <link rel="stylesheet" th:href="@{/fly/css/global.css}"/>
</head>
<body>
<div class="fly-header layui-bg-black">
  <div class="layui-container">
    <a class="fly-logo" href="javaScript:void(0)">
      <img th:src="@{'/fly/images/logo.png'}" alt="layui"/>
    </a>

    <ul class="layui-nav fly-nav-user">

      <!-- 未登入的状态 -->
      <li class="layui-nav-item">
        <a class="iconfont icon-touxiang layui-hide-xs" href="/login"></a>
      </li>
      <!-- 登入后的状态 -->
      <!--<li class="layui-nav-item">
        <a class="fly-nav-avatar" href="javascript:;">
          <cite class="layui-hide-xs">贤心</cite>
          <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：layui 作者"></i>
          <i class="layui-badge fly-badge-vip layui-hide-xs">VIP3</i>
          <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg">
        </a>
        <dl class="layui-nav-child">
          <dd><a href="user/set.html"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
          <dd><a href="user/message.html"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
          <dd><a href="user/home.html"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
          <hr style="margin: 5px 0;">
          <dd><a href="/user/logout/" style="text-align: center;">退出</a></dd>
        </dl>
      </li>-->
    </ul>
  </div>
</div>
<div class="layui-container fly-marginTop">
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title">
        <li class="layui-this">登入</li>
        <!--<li><a href="reg.html">注册</a></li>-->
      </ul>
      <form th:action="@{/authentication/form}" method="post" id="list_form">
        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
          <div class="layui-tab-item layui-show">
            <div class="layui-form layui-form-pane">
              <form method="post">
                <div class="layui-form-item">
                  <label class="layui-form-label">账号</label>
                  <div class="layui-input-inline">
                    <input type="text" id="username" name="username" required lay-verify="required" autocomplete="off"
                           class="layui-input">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">密码</label>
                  <div class="layui-input-inline">
                    <input type="password" value="123456" id="password" name="password"
                           autocomplete="off" class="layui-input">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label for="L_vercode" class="layui-form-label">验证码</label>
                  <div class="layui-input-inline">
                    <input type="text" id="L_vercode" name="imageCode"
                           onkeyup="this.value = this.value.replace(/\D/g, '')"
                           onblur="this.value = this.value.replace(/\D/g, '')"
                           placeholder="请输入验证码" autocomplete="off" class="layui-input">
                  </div>
                  <div class="layui-form-mid">
                    <img th:src="@{'/code/image?width=80'}">
                  </div>
                </div>
                <div class="layui-form-item">
                  <span style="color: red" th:if="${errorMsg != ''}" th:text="${errorMsg}">asa</span>
                </div>
                <div class="layui-form-item">
                  <button class="layui-btn" type="button" onclick="login()">立即登录</button>
                  <span style="padding-left:20px;">
                  <a href="forget.html">忘记密码？</a>
                </span>
                </div>
                <!--<div class="layui-form-item fly-form-app">
                  <span>或者使用社交账号登入</span>
                  <a href="/qqLogin/weixin" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-qq"
                     title="QQ登入"></a>
                  <a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-weibo"
                     title="微博登入"></a>
                </div>-->
                <div class="layui-form-item fly-form-app">
                  <span>内部系统：</span>
                  <span>账号(随意)，主要为记录错题集</span>
                  <span>密码为：123456</span>
                </div>
              </form>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>

<div class="fly-footer">
  <p><a href="http://fly.layui.com/" target="_blank">平台社区</a> 2019 &copy; <a href="http://www.layui.com/"
                                                                             target="_blank">平台部出品</a></p>
</div>
<script th:inline="javascript">
  /*<![CDATA[*/
  document.onkeydown = EnterLogin;
  function EnterLogin(event) {
    if (event.keyCode == 13) {
      login();
    }
  }
  function login() {
    $("#list_form").submit();
  }
  /*]]>*/
</script>
</body>
</html>